function [ PNout ] = kalmanCoefUpdate( YN, N, reset, w )
%KALMANEQUALIZER Summary of this function goes here
%   Detailed explanation goes here

persistent PN;
delta = 0.0010;

if reset==1
   PN=(delta)^-1*eye(N); 
end


% w=0.98;

KN_top=PN * conj(YN);
KN_bottom= w + transpose(YN) * PN * conj(YN);
KN=KN_top / KN_bottom ;

PN=( PN - KN * transpose(YN) * PN )/w;

PNout=PN;

